LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   pkgtools upgrade $ROOT (https://www.linuxquestions.org/questions/slackware-14/pkgtools-upgrade-%24root-4175694049/)

DryFalls 04-21-2021 02:49 PM

pkgtools upgrade $ROOT
 
Greetings! I use pkgtools to build/upgrade sfs modules for another distro (a fork of puppy linux - 50M running slackware64-current). My scripts use
Quote:

ROOT=<path> upgradepkg ~/slackware/*/*.txz
The new system looks in the destination directory for system files so fails. Please forgive my ignorance, but I'm fairly new to this. My immediate solution was to retain the original upgradepkg script. But with 'slackpkg upgradeall' or slapt-get, this will break. How can I modify my build scripts to accommodate the new pkgtools upgrade? Thanks in advance.

DryFalls

drumz 04-21-2021 04:17 PM

Here is the recent change that was made:

https://git.slackware.nl/current/dif...c8a83be9650a6c

which leads to the solution:

First do a
Code:

# ROOT=<path> installpkg pkgtools
So that installpkg will exist at "$ROOT/sbin/installpkg" when running upgradepkg. To be honest, I'm not sure why this change was made... In my opinion, upgradepkg should find out where it is installed and use the installpkg that is installed in the same path. But I'm not Pat.

DryFalls 04-22-2021 03:57 AM

Thanks drumz. I imagine there's something in the works with slackpkg which will need the $ROOT syntax but it means it's more cumbersome to use slackware to work on other systems. There are a lot of distros which use slackware packages and slapt-get or slackpkg/pkgtools. I think I will go ahead and upgrade pkgtools and rename the previous 'upgradepkg' to something like 'upgradepkg2' in my build scripts. It seems a bit over-kill to install pkgtools into each and every sfs module I build.

drumz 04-22-2021 09:20 AM

Another option: I think it would be sufficient to just copy /sbin/installpkg to $ROOT/sbin/installpkg and then run upgradepkg. After you're done, delete $ROOT/sbin/installpkg. I didn't test though.

/sbin/installpkg is just a shell script that weighs in at a whopping 27KiB (27635 bytes), so this shouldn't slow down your process at all (as long as you automate it).

Edit: And yet another option: Just create a symlink:
Code:

ln -s /sbin/installpkg $ROOT/sbin/installpkg

USUARIONUEVO 04-22-2021 04:20 PM

Same problem here , i have squashfs container , respecting slackware series , like

slack_a.squashfs
slack_ap.squashfs
slack_d.squashfs


when try to upgrade the containers with

ROOT=slack_a upgradepkg new_package

Now only see errors , for me its not a solution install in all *.squashfs , cause when arrives a update for the upgradepkg file, then i need upgrade in all containers.

I thing the managing tools , ever need to be executes from the real ROOT directory , not from dirs passed to the $ROOT parameter.


And no , for me not a solution make all series in one big *.squashfs , i prefer small container separately.

USUARIONUEVO 04-22-2021 09:55 PM

If some one need fix this, dowgrade to pkgtools-15.0-noarch-37 , and blacklist to avoid version 38 of this package ,is now totally break.

can download for 64bit here
https://slackware.uk/cumulative/slac...slackware64/a/

The problem , is caused because now , the script make ROOT like this

ROOT/sbin/upgradepkg or other tool from this packages

If the ROOT DESTDIR not have the tool installed (installpkg/upgradepkg) , then fails , cause executable no exists under custom dir destination.

This now breaks totally some particular usages , as a little example , livekit from eric (alienbob) , make separated squashfs container using --root argument , now all fails , cause not all squashfs have the tools installed , this force to install this package in every series , and IN OUR CUSTOM ADDONS , cause we cant do now as example a new nvidia squashed file container cause the command fails if not install pkgtools under same dir , and remove it later to clean squashfs.

Imagine we have nvidia-466.67....txz , and we try to make our addon ,

ROOT=folder-to-make-our-squash installpkg nvidia....txz -----------> fails
installpkg --root=folder-to-make-our-squash nvidia...txz ---> fails

I know , eric provide this addon , okey ..imagine try wahtever you want ... need first install pkgtools , to desired custom root dir , install our package , and later remove pkgtools from the custom dir.


pkgtools-15.0-38 is totally breaked for me.

drumz 04-23-2021 04:13 PM

Fixed :)

Code:

Fri Apr 23 19:13:09 UTC 2021
a/pkgtools-15.0-noarch-39.txz: Rebuilt.
      upgradepkg: revert change where $ROOT/sbin/installpkg is called instead of
      /sbin/installpkg. Conceptually, this seemed like a nice change (but would
      have also required removepkg to be called the same way), but it seems to
      break an established expectation that the pkgtools can be used without them
      actually being installed in $ROOT. Thanks to alienBOB.



All times are GMT -5. The time now is 05:28 AM.