History log of /haiku/src/apps/packageinstaller/PackageInfo.cpp
Revision Date Author Comments
# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# aa7f93c5 24-Jan-2019 Rob Gill <rrobgill@protonmail.com>

src/apps Code formatting

* No functional changes

code formatting changes only

Change-Id: I046ae21d9b288126022fe0bc2ddf827843765e70
Reviewed-on: https://review.haiku-os.org/c/896
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# e3e5e006 24-Jun-2015 Philippe Saint-Pierre <stpere@gmail.com>

CID 991517: Resource Leak in PackageInfo::Parse()


# 0aa2c1fc 20-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

PackageInstaller: Fixed more problems with working directories

I've encountered three different ways of specifying the working directory
for install scripts: Relative to target folder, relative to install folder
and absolute. At least those three now work...


# 3f5014ec 16-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

PackageInstaller: Run install scripts in the correct directory

* From debugging with the Gobe and Moho installer, scripts define which
folder to run them from. The PackageInstaller is supposed to run the script
in that working directory. The parser seems to have the correct folder in
"installPath" when adding the script as PackageItem, but that code is rather
horrible. I've changed it so PackageScript items also set the path, use
InitPath() to obtain the final working directory and set it before running
the script.
* Both Moho and Gobe create the Deskbar link from that script, the folder
is rewritten in the script via ReplaceAll().
* Correctly running the script makes a bug visible: Dynamically added files
in the install location by these scripts are not removed when uninstalling
the package. When re-installing a package, it is first uninstalled and this
currently gives an error for both Moho and Gobe, since they create some
links in these scripts which never worked before. To install again, the
install folder needs to be deleted manually.
* Some cleanup along the way... sorry.


# 1bc7045f 15-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel, libroot: Introduce new API for obtaining system info


# 3b49d994 19-Jul-2013 Murai Takashi <tmurai01@gmail.com>

Use delete[] instead of delete. Fixes #9985.

Signed-off-by: Matt Madia <mattmadia@gmail.com>


# bd380b55 04-May-2013 Jérôme Duval <jerome.duval@gmail.com>

PackageInstaller: some 64 bit fixes


# aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 0368c553 20-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Remove translated debugging output. This being primarily a GUI app.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41060 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4eb0cbb0 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36733 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eef95624 06-May-2010 Matt Madia <mattmadia@gmail.com>

Updated to use B_TRANSLATE* macros. relates to #5408.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f51cdb44 05-May-2010 Stephan Aßmus <superstippi@gmx.de>

Remembered the rule wrong about how many blank lines between copyright and
headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36619 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 091440e0 05-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Jorma Karvonen: Localization of the PackageInstaller. Thanks a lot!
Contains small coding style corrections by myself. Closes ticket #5907.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36618 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ff2343b 01-Apr-2010 Jérôme Duval <korli@users.berlios.de>

Applied patch by sil2100 that enables handling of script files (bug #3762)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36020 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7974d3dc 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0064d324 09-Jan-2010 Jérôme Duval <korli@users.berlios.de>

* added and used the macro RETURN_AND_SET_STATUS()
* added parsing for DQue, DQTi, DQSz, DQMi tags. This could be used to check if an application is actually installed.
* added parsing for PtcI (unknown use).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34981 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78c00a4a 11-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by sil2001 that fixes bug #3666 (handling of existing symlinks).
* Refactored PkgItem classes, and pulled out a PackageItem base class. Renamed
other classes to Package*.
* The ItemExists() method should really get a "Apply this choice to all files"
kind of option...
* Style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a8ffa88 15-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* Break parsing loop if PkgA is encountered. This helps with QEmu pkg.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d17b26a 28-Dec-2008 Rene Gollent <anevilyak@gmail.com>

Patch by Lukasz Zemczak: fix installer crashes reported in ticket #2969.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27ec8243 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

fixed bug #2101 : normalize user paths, use localType for links


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25081 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44f919da 12-Oct-2007 Ryan Leavengood <leavengood@gmail.com>

Adding Łukasz Zemczak's package installer to our tree. This was his Google
Summer of Code project. Thanks for your work Łukasz and I hope we can see
more work from you.

Still to do:
- Create an icon.
- Add pkg files to the MIME database with PackageInstaller as the default
handler. The rdef here has the MIME type name for the pkg format should
anyone else choose to add it :)
- Support for running scripts included with packages.
- Testing various different packages.
- Fixing problems in the Haiku GUI layout system which affect the code used
for various parts of the installer GUI (please bear with the commented out
code for now.)
- Adding this to the image.

Tomorrow I will add Łukasz's InstalledPackages utility which can be used to
view installed packages and uninstall them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e3e5e00627e21e26e5cb8984be4ca81049dfdc97 24-Jun-2015 Philippe Saint-Pierre <stpere@gmail.com>

CID 991517: Resource Leak in PackageInfo::Parse()


# 0aa2c1fca32969f649714d2bf93bfc6ef91926a0 20-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

PackageInstaller: Fixed more problems with working directories

I've encountered three different ways of specifying the working directory
for install scripts: Relative to target folder, relative to install folder
and absolute. At least those three now work...


# 3f5014ec86d210bd1d63f14c7640d1c68b7d8684 16-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

PackageInstaller: Run install scripts in the correct directory

* From debugging with the Gobe and Moho installer, scripts define which
folder to run them from. The PackageInstaller is supposed to run the script
in that working directory. The parser seems to have the correct folder in
"installPath" when adding the script as PackageItem, but that code is rather
horrible. I've changed it so PackageScript items also set the path, use
InitPath() to obtain the final working directory and set it before running
the script.
* Both Moho and Gobe create the Deskbar link from that script, the folder
is rewritten in the script via ReplaceAll().
* Correctly running the script makes a bug visible: Dynamically added files
in the install location by these scripts are not removed when uninstalling
the package. When re-installing a package, it is first uninstalled and this
currently gives an error for both Moho and Gobe, since they create some
links in these scripts which never worked before. To install again, the
install folder needs to be deleted manually.
* Some cleanup along the way... sorry.


# 1bc7045fdfb85e6151d01c73669be19627c4783b 15-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel, libroot: Introduce new API for obtaining system info


# 3b49d99436f5e98478fcfb3630d7b802bdf47c02 19-Jul-2013 Murai Takashi <tmurai01@gmail.com>

Use delete[] instead of delete. Fixes #9985.

Signed-off-by: Matt Madia <mattmadia@gmail.com>


# bd380b558ac049d9b29f9e9ce475f5aae6564eb0 04-May-2013 Jérôme Duval <jerome.duval@gmail.com>

PackageInstaller: some 64 bit fixes


# aed35104852941f0f6f3d1dcc5338b5f337d0a3c 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 0368c5532225b3e59bc7620d0de133c073e6a6ba 20-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Remove translated debugging output. This being primarily a GUI app.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41060 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4eb0cbb044cf538f18c0d252934a5bcaa33bfd34 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36733 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eef956245ee61a863221ea316e715d03773a6383 06-May-2010 Matt Madia <mattmadia@gmail.com>

Updated to use B_TRANSLATE* macros. relates to #5408.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f51cdb4436c3d03c13683d120f6c677dfca616c1 05-May-2010 Stephan Aßmus <superstippi@gmx.de>

Remembered the rule wrong about how many blank lines between copyright and
headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36619 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 091440e0048f51f8708bece1a8aebeae3d1f2d36 05-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Jorma Karvonen: Localization of the PackageInstaller. Thanks a lot!
Contains small coding style corrections by myself. Closes ticket #5907.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36618 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ff2343b35fc95500601a2cb77719dd591e7f423 01-Apr-2010 Jérôme Duval <korli@users.berlios.de>

Applied patch by sil2100 that enables handling of script files (bug #3762)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36020 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7974d3dcf39ce78e5885b481eee12e561ad6e096 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0064d3243a5237b99856ed6e47cd335f732cfde5 09-Jan-2010 Jérôme Duval <korli@users.berlios.de>

* added and used the macro RETURN_AND_SET_STATUS()
* added parsing for DQue, DQTi, DQSz, DQMi tags. This could be used to check if an application is actually installed.
* added parsing for PtcI (unknown use).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34981 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78c00a4a53afcaeeebb337e5601dd8c1f70308e6 11-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by sil2001 that fixes bug #3666 (handling of existing symlinks).
* Refactored PkgItem classes, and pulled out a PackageItem base class. Renamed
other classes to Package*.
* The ItemExists() method should really get a "Apply this choice to all files"
kind of option...
* Style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a8ffa8805452ab920a2c7d59be214ca6ffb500d 15-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* Break parsing loop if PkgA is encountered. This helps with QEmu pkg.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d17b26a56dd0cd3daa296b05f4d8c2a9af69146 28-Dec-2008 Rene Gollent <anevilyak@gmail.com>

Patch by Lukasz Zemczak: fix installer crashes reported in ticket #2969.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27ec8243b2c477977a8b48cb18b10e545ffde871 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

fixed bug #2101 : normalize user paths, use localType for links


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25081 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44f919da9afa25ffd54e29c6f64cfba20e41f34f 12-Oct-2007 Ryan Leavengood <leavengood@gmail.com>

Adding Łukasz Zemczak's package installer to our tree. This was his Google
Summer of Code project. Thanks for your work Łukasz and I hope we can see
more work from you.

Still to do:
- Create an icon.
- Add pkg files to the MIME database with PackageInstaller as the default
handler. The rdef here has the MIME type name for the pkg format should
anyone else choose to add it :)
- Support for running scripts included with packages.
- Testing various different packages.
- Fixing problems in the Haiku GUI layout system which affect the code used
for various parts of the installer GUI (please bear with the commented out
code for now.)
- Adding this to the image.

Tomorrow I will add Łukasz's InstalledPackages utility which can be used to
view installed packages and uninstall them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22525 a95241bf-73f2-0310-859d-f6bbb57e9c96