Arch Linux Forums

Discussion forums for Arch Linux, a simple, lightweight linux distribution.

You are not logged in.

#1 2008-05-22 21:10:31

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

pkgman - a bash script for local package and PKGBUILD management

hi all,

here is a script which manages a local repository and lets you edit
PKGBUILDs and other related files, automatically generates checksums,
build packages, add them to your local repo and so on.
it also has AUR support for submitting tarballs, leaving comments, etc.

get it from here:
http://sourceforge.net/projects/pkgman/
and AUR package:
http://aur.archlinux.org/packages.php?ID=17100
you need abs, curl and pacman and optionally namcap and desktop-file-utils.

output of "pkgman -h":

Code:

pkgman provides a unified tool to ease the workflow with pacman packages:
edit and backup PKGBUILDs, compile and build packages, manage a local repository and submit tarballs to AUR
For a more detailed description please read the manual page.

Usage: pkgman [packagename] [options] [parameters]

Initialize directory structure for use with pkgman:
    --runmefirst                check $Localpackages for directories matching ABS or AUR packages and index them

Most simple usage:
    <packagename>       check if <packagename> exists either in ABS or AUR, copy files
                                    or download and untar the source tarball to $Localpackages dir and edit files
    Possible options are:
        -a, --abs               synchronize abs repositories specified in /etc/abs.conf
        -b, --backup            toggle BackupTarball to yes or no depending on its setting in pkgman.conf
        -m, --makepkg           toggle UseMakepkg to yes or no depending on its setting in pkgman.conf
        -r, --repoadd           toggle UseRepoadd to yes or no depending on its setting in pkgman.conf
        -w, --switch            toggle SwitchToBuildDirectory to yes or no depending on its setting in pkgman.conf

Create a new PKGBUILD source tarball:
    <packagename> -n, --new     choose template from $TemplatesDir, copy it to $Localpackages/<packagename>
    Possible options to use with "-n|--new":
        -b, --backup            toggle BackupTarball to yes or no depending on its setting in pkgman.conf
        -m, --makepkg           toggle UseMakepkg to yes or no depending on its setting in pkgman.conf
        -r, --repoadd           toggle UseRepoadd to yes or no depending on its setting in pkgman.conf
        -s, --submit            submit newly created src.tar.gz to AUR
        -w, --switch            toggle SwitchToBuildDirectory to yes or no depending on its setting in pkgman.conf

Edit an existing PKGBUILD source tarball:
    <packagename> -e, --edit    edit files in package or backup directory
    Possible options to use with "-e|--edit":
        -b, --backup            toggle BackupTarball to yes or no depending on its setting in pkgman.conf
        -m, --makepkg           toggle UseMakepkg to yes or no depending on its setting in pkgman.conf
        -r, --repoadd           toggle UseRepoadd to yes or no depending on its setting in pkgman.conf
        -s, --submit            submit edited src.tar.gz to AUR
        -v <version>, --pkgbuildversion <version>     edit given backed up version
        -w, --switch            toggle SwitchToBuildDirectory to yes or no depending on its setting in pkgman.conf

<packagename> directory and backup directory maintenance:
    <packagename> -l, --list    show the files in backup directory and some information
    -l, --list                  show available package directories in $Localpackages
    <packagename> --cleanup     menu with options for removing files in $Localpackages/<packagename>:
                                one can either choose to delete files except source files ending on bz2, deb, jar, gz, tgz, rar, rpm, run, zip or
                                delete ALL files in $Localpackages/<packagename>
    --cleanup                   menu with options for removing files in each <packagename> directory in $Localpackages:
                                one can either choose to delete files except source files ending on bz2, deb, jar, gz, tgz, rar, rpm, run, zip or
                                delete ALL files in each <packagename> directory in $Localpackages
    <packagename> -c, --check   check backed up packages
    <packagename> -d, --delete  delete files in backup directory
    <packagename> --Deleteall   delete ALL files in backup directory

Local repository maintenance:
    -r, --repoadd               ask for package in backup directory to add to $LocalRepository
    Further option for "-r|--repoadd":
        -l, --list              show packages in $LocalRepository
    R, --Reporemove             remove <packagename> package from $LocalRepository

ABS/AUR related options:
    -a, --abs                  synchronize abs repositories specified in /etc/abs.conf
    -C, --comment               add a comment if package is in AUR/Community; this works with any package
    --Disown                    disown an AUR package owned by user 
    --getownpackages            resync own packages in /home/vlad/apps/arch/pkgbuild-self with AUR
    --listversions              show available ABS/AUR versions of already installed packages from /home/vlad/apps/arch/pkgbuild-self
    -o, --own                   list only own packages submitted to AUR found in /home/vlad/apps/arch/pkgbuild-self
    -s, --submit                submit a backed up tarball to AUR

Miscellaneous options:
    -h                          display short help
    --help                      show man page; same as "man pkgman"
    -i, --info                  list settings according to pkgman.conf
    -V, --version               show version information

Layout options:
    --default                   switch back to default color layout (if changed in pkgman.conf)
    --lightbg                   change color layout 
    --nocolor                  don't use any colors

RTFM online:
http://sourceforge.net/apps/mediawiki/p … n_man_page

first of all copy the pkgman.conf and AUR.conf files from /usr/share/pkgman to ~/.config/pkgman/ ,
edit these two files and then run

Code:

pkgman --runmefirst

pkgman doesnīt install anything. if you want it just builds the package and moves it to your local repository. install it then with pacman.
it also has no dependency handling. there are many other tools which provide this.

the main intention was to keep track of package versions, different PKGBUILD versions and own AUR submitted tarballs; also to keep a clean local repository and clean build directories.

pkgman is stable now. iīm using it for months without any issues.
however, if there are problems or feedback please post them here.

vlad

changelog:

version 2.4:
       *pkgman now respects the PKGDEST and SRCDEST variables from makepkg.conf. (though it still moves the src.tar.gz and .pkg.tar.gz to package backup directory).

version 2.5:
       *pkgman uses PKGDEST if SRCDEST not set in makepkg.conf.

version 2.6 -> r26:
       *changed version system: version 2.6 is now r26!
       *minor changes: > pkgman uses now the $SHELL variable.
                                > new and more comprehensible manpage description (thanks to bender02)

version r27:
       *changed SRCDEST since it's only a cache dir. all files (pkg.tar.gz and src.tar.gz) go to PKGDEST.

version r28:
       *added new variable ShellCommand to pkgman.conf. Default is $SHELL.
       *One might use an external application (like screen or xterm) to switch to build directory and edit files simultaneously.

version r30:
       *minor changes. nothing crucial

r32: *OverwriteExistingPackage isn't used anymore. one can delete it from ~/.config/pkgman/pkgman.conf.
       *minor changes

version r33:
       *"-l|--list" also shows installed package version and available ABS/AUR PKGBUILD version for given package.
       *"-a|--abs" can now also be used with other options (like "-e")

r39: * when backing up src.tarballs it asks whether to backup the source file or not
       * more detailed "--list" option - also shows if package is installed or not and available ABS/AUR version
       * added prompt to clean up directory after makepkg
       * when checking pkg.tar.gz also possibility to check for conflicts with files of already installed packages
       * use $PAGER instead of less
       * --help directly shows the manpage
       * --shorthelp shows a brief usage overview
       * added a custom prompt, but only when using bash (is somehow experimental - works fine here for me)
       * minor internal changes
       * pkgman also reads ~/.aurvote file for getting aur name and password. if one already uses aurvote then there is no need for the
         ~/.config/pkgman/AUR.conf file.

r40: * new manual page & rewrite of usage function
       * both option "--flush" and "--flushall" were omitted in favor of the more versatile "--cleanup" option
       * pkgman <packagename> checks now if <packagename> is owned by user
       * backup option after each editing
       * added license
       * minor internal changes

r41: * just small bug fixes, nothing crucial.

r42: * more bugs fixed.

r45: * new options added:
          >   --listversions: list local and available versions of installed packages from LocalPackages directory
          >  --getownpackages: synchronize local own packages with AUR
       * added new variable in pkgman.conf:
          > ListOutputInPager: output of, for example, "--list" or "--own" is piped into $PAGER
       * added a new optional dependency "desktop-file-utils" for validating desktop entry files
       * also supports now auto-generation of sha sums not only md5
       * internal fixes due to AUR interface changes:
          > use of json interface
          > correct parsing of package category
       * added 2 proto files (located under /usr/share/pacman):
          >  proto.desktop: a template for *.desktop files
          > PKGBUILD-lib32.proto: a template for lib32 packages for x86_64
       * some code changes and fixes

r46: * added new option to pkgman.conf (AutoGenerateSums).
         > if AutoGenerateSums=no then pkgman asks whether to generate checksums or not.
         > if set to yes it behaves like in former versions.

r52: * "--getownpackages" with more than 100 packages works again
       * added new option "--cachecopy":
          For each package in CacheCopyList (new variable in pkgman.conf) get existing package from pacman's cache directory - if
          CopyPkgFromCache (new variable in pkgman.conf) is set to yes - and/or create a source tarball of PKGBUILD and related files from ABS -
          if CopySrcFromABS (new variable in pkgman.conf) is set to yes - and copy them to package backup directory.
       * added new variables to pkgman.conf:
           > "CacheCopyList=file" - batch backup file, one package per line - default location is "$HOME/.config/pkgman/package.list".
           > "CopySrcFromABS=[yes|no]"
           > "CopyPkgFromCache=[yes|no]"
       * some bugfixes
       * docs completed
       * CacheCopyList should look like
         

Code:

package1
package2
#this is a comment
!  this too
package3
!package4

r54: * renamed "--listversions" option to "--diffversions". makes more sense!
          from the man page:
              pkgman --diffversions
              Show differing ABS/AUR versions of installed packages from LocalPackages.

r55: * minor changes.

r57: * testing release
       * added a new option "--rollback":
           "pkgman <packagename> --rollback" - checks  http://arm.kh.nu for available package versions,
                                                      lets you choose one, fetches the package and
                                                      moves it to the <packagename> backup directory (if "--repoadd" is used).

r59: * stable release
       * new option "--rollback" (see r57):
               it checks http://arm.kh.nu (Arch Rollback Machine) for available package versions,
               downloads chosen file and moves it to local repository (if "-r|--repoadd"  is used).
        * posting files/comments/etc to AUR should work now again.

r65: *stable release
       * new option "-M,--meta" to create metapackages and add them and their dependencies to local repository.
          it searches for deps inside the backup directories, pacman's cache and if the packages are not available, it tries to fetch the missing
          dependencies from the Arch Rollback Machine site (http://arm.kh.nu).

r66: * minor fixes

r68: * some bugfixes
       * "--repoadd" and "--Reporemove" now accurately removes old packages from LocalRepository

r69: * small bugfixes when listing packages with similar names
       * curl retries now 5 times if connection is not established

r75: * "--cachecopy" does not try to dl sourcefiles when backing up ABS PKGBUILDs
       * some work on package splitting
       * further internal changes

r76: * minor mistakes with "ln" purged

r79: * mostly small changes
       * "--cleanup" now also removes uninstalled packages from LocalRepository

r81 & r80: * added AUR v1.6.0 support (use more json)
                * small ARM changes ("--rollback")

Last edited by DonVla (2009-11-08 14:08:13)


pkgman - the ultimate mosquito control (AUR)

Offline

 

#2 2008-05-22 21:25:29

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

I'm having some troubles with it (perhaps missing dependencies, and forgotten hardcoded dirs?):

Code:

jan@aconcagua  8:20PM ~ % pkgman --runmefirst
/usr/bin/pkgman: line 77: /home/jan/apps/skripte/archscripts/pkgman/share/pkgman/color.bash: No such file or directory
/usr/bin/pkgman: line 1293: initcolor: command not found
/usr/bin/pkgman: line 312: highlight: command not found
/usr/bin/pkgman: line 312: error: command not found
/usr/bin/pkgman: line 313: highlight: command not found
/usr/bin/pkgman: line 313: error: command not found
/usr/bin/pkgman: line 314: highlight: command not found
/usr/bin/pkgman: line 314: error: command not found
/usr/bin/pkgman: line 315: highlight: command not found
/usr/bin/pkgman: line 315: error: command not found
/usr/bin/pkgman: line 317: error: command not found
/usr/bin/pkgman: line 318: error: command not found
/usr/bin/pkgman: line 321: highlight: command not found
/usr/bin/pkgman: line 321: msg: command not found

/usr/bin/pkgman: line 329: list: command not found
/usr/bin/pkgman: line 332: list: command not found
/usr/bin/pkgman: line 332: list: command not found
touch: cannot touch `/bin/.pkgman.registered': Permission denied
/usr/bin/pkgman: line 332: list: command not found
/usr/bin/pkgman: line 332: list: command not found
/usr/bin/pkgman: line 332: list: command not found
/usr/bin/pkgman: line 332: list: command not found
/usr/bin/pkgman: line 332: list: command not found

/usr/bin/pkgman: line 337: msg: command not found

curl: option --output: requires parameter
curl: try 'curl --help' or 'curl --manual' for more information
^C/usr/bin/pkgman: line 209: cleanoutput: command not found

/usr/bin/pkgman: line 209: cleanoutput: command not found

(I terminated with ctrl-c).

EDIT: errors resolved by correcting the path $HOME/apps/skripte/archscripts/pkgman/share/pkgman to /usr/share/pkgman in the pkgman itself.

Last edited by bender02 (2008-05-22 21:28:58)

Offline

 

#3 2008-05-22 21:48:25

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

Another problem is that I have
PKGDEST=/var/abs/local/packages
set in /etc/makepkg.conf, and so all the built packages and source tarballs are exported into that directory. Your prog assumes that they remain in the dir where makepkg is called, and so it doesn't do what you expect it to do (well, no harm done, it just doesn't do anything).

But except for this, I quite like your script!

EDIT: I guess a solution to this could be that you 'source /etc/makepkg.conf' and then use $PKGDEST whenever you want to move/copy stuff made by makepkg.

Last edited by bender02 (2008-05-22 21:53:46)

Offline

 

#4 2008-05-22 21:53:17

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

oh sorry! my fault.
corrected! should work now.

vlad


pkgman - the ultimate mosquito control (AUR)

Offline

 

#5 2008-05-22 21:55:42

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

Just keep md5sums on AUR in sync with your updates, please smile

Offline

 

#6 2008-05-22 22:01:46

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

bender02 wrote:

Another problem is that I have
PKGDEST=/var/abs/local/packages
set in /etc/makepkg.conf, and so all the built packages and source tarballs are exported into that directory. Your prog assumes that they remain in the dir where makepkg is called, and so it doesn't do what you expect it to do (well, no harm done, it just doesn't do anything).

But except for this, I quite like your script!

EDIT: I guess a solution to this could be that you 'source /etc/makepkg.conf' and then use $PKGDEST whenever you want to move/copy stuff made by makepkg.

i see. i havenīt thought about that. i never used PKGDEST and the other variables in makepkg.conf.
this script is intended to be used as user not root, so you donīt have write permissions to /var/abs/local anyway. everything should be inside the $HOME dir...
i will check how to integrate makepkg.conf.

vlad

ps: md5sums are ok now.
sorry for the inconvenience.

Last edited by DonVla (2008-05-22 22:03:54)


pkgman - the ultimate mosquito control (AUR)

Offline

 

#7 2008-05-22 22:05:36

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

DonVla wrote:

i see. i havenīt thought about that. i never used PKGDEST and the other variables in makepkg.conf.
this script is intended to be used as user not root, so you donīt have write permissions to /var/abs/local anyway. everything should be inside the $HOME dir...
i will check how to integrate makepkg.conf.

hm? I use your script as a user. I do all local package management as a user (makepkg, ...), and I have write permissions to /var/abs/local/* That's how I set things up: /var/abs/local/* contains the usual directory structure of a repo with my own dirs with PKGBUILDs. (/var/abs/local/packages is an exception smile

I don't know, I read somewhere that /var/abs/local is one of the possibilities for a local repo (abs leaves it alone, and it nicely exists alongside other repos), and so I set it up that way... No matter, it's like having it in $HOME.

EDIT: Having a second look at makepkg.conf, there's one more var that affect your script: SRCDEST.

Last edited by bender02 (2008-05-22 22:09:28)

Offline

 

#8 2008-05-22 22:11:30

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

iīm a little confused.
i have no write permissions to /var/abs/local. perhaps makepkg is allowed to copy files therein.
i think thatīs an important point i missed.
need more input and testing.

vlad


pkgman - the ultimate mosquito control (AUR)

Offline

 

#9 2008-05-22 22:17:41

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

I'm sorry. I didn't mean to confuse you. I myself decided that /var/abs/local would be a good place for a local repo with PKGBUILDs, and so I created that directory, chowned it to myself (not root!), pointed /etc/makepkg.conf to it, and went ahead and created some PKGBUILDs there.

I meant to say, it's the same thing as if you would keep PKGBUILDs in (e.g.) $HOME/localrepo... it just seemed to me as a good idea to use /var/abs/local instead (at that time).

It's just that you need to incorporate PKGDEST and SRCDEST variables from /etc/makepkg.conf into your script - since when you call 'makepkg --source', it creates .src.tar.gz in the SRCDEST dir, and when you call 'makepkg ...', it creates .pkg.tar.gz in the PKGDEST dir.

Offline

 

#10 2008-05-22 22:44:52

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

ok, i thought the /var/abs/local stuff is a "hidden" feature of abs and makepkg.
in next version iīll integrate the PKGDEST and SRCDEST variables.
thanks! i totally missed this.

vlad


pkgman - the ultimate mosquito control (AUR)

Offline

 

#11 2008-05-22 23:38:48

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

version 2.4: 
pkgman now respects the PKGDEST and SRCDEST variables from makepkg.conf.
(though it moves the src.tar.gz and .pkg.tar.gz to the backup directory).

vlad


pkgman - the ultimate mosquito control (AUR)

Offline

 

#12 2008-05-22 23:43:49

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

Thanks!

I've been playing around with it a bit, and I must admit that I don't quite understand the workflow. The functions I miss are of sorts "[cleanup]: delete src/* pkg/* and all the downloaded source files, and leave only PKGBUILD + .install + some other files that came with the tarball"; "[make backup]: make another backup (after I edited the PKGBUILD manually)". For instance, it usually takes me a few tries to debug a new PKGBUILD, and after I'm done with it, I'd like to make a backup to the .backup dir using pkgman.

Last edited by bender02 (2008-05-22 23:44:41)

Offline

 

#13 2008-05-22 23:53:46

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

Ah! There's one more thing to be aware of: if you have PKGDEST *set* and SRCDEST *not set* in makepkg.conf, then makepkg uses PKGDEST as SRCDEST implicitly (ie .src.tar.gz's are put into PKGDEST).

One possible fix is to use  ${SRCDEST:-$PKGDEST} instead of $SRCDEST (or just make a test if SRCDEST is set after sourcing makepkg.conf, and if not, set it to PKGDEST). Now I don't know what happens if SRCDEST is set but PKGDEST is not....

Offline

 

#14 2008-05-23 00:04:04

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

bender02 wrote:

Thanks!

I've been playing around with it a bit, and I must admit that I don't quite understand the workflow. The functions I miss are of sorts "[cleanup]: delete src/* pkg/* and all the downloaded source files, and leave only PKGBUILD + .install + some other files that came with the tarball";

you can edit a PKGBUILD and then run makepkg ("pkgman -emb"). if this fails you can edit it again. afterwards you can tag the source tarball file (smth like <test 1>). then run "pkgman --flush" to clear the directory (it doesnīt remove the package source files - the actual code) and reedit a version by running "pkgman -e -v <version of source tarball and tag>"

"[make backup]: make another backup (after I edited the PKGBUILD manually)". For instance, it usually takes me a few tries to debug a new PKGBUILD, and after I'm done with it, I'd like to make a backup to the .backup dir using pkgman.

backed up source tarballs with same version and/or same tag are overwritten anyway.

vlad

Last edited by DonVla (2008-05-23 00:42:11)


pkgman - the ultimate mosquito control (AUR)

Offline

 

#15 2008-05-23 00:14:37

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

Great! Thanks! I knew it's just that I don't understand the options properly. I guess I was fooled by the explanations of '-b' and '-m' that are printed when you run 'pkgman'. I thought that they just edit the pkgman.conf file.

Offline

 

#16 2008-05-23 00:26:59

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

bender02 wrote:

Great! Thanks! I knew it's just that I don't understand the options properly. I guess I was fooled by the explanations of '-b' and '-m' that are printed when you run 'pkgman'. I thought that they just edit the pkgman.conf file.

no, these options toggle the settings in pkgman.conf. i always back up everything, so i use BackupTarball=yes.
the help and manpage could be more explicit. it is only quick-and-dirty...
i also have to take a closer look at the makepkg.conf settings.

vlad


pkgman - the ultimate mosquito control (AUR)

Offline

 

#17 2008-05-23 02:54:08

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

bender02 wrote:

Ah! There's one more thing to be aware of: if you have PKGDEST *set* and SRCDEST *not set* in makepkg.conf, then makepkg uses PKGDEST as SRCDEST implicitly (ie .src.tar.gz's are put into PKGDEST).

One possible fix is to use  ${SRCDEST:-$PKGDEST} instead of $SRCDEST (or just make a test if SRCDEST is set after sourcing makepkg.conf, and if not, set it to PKGDEST). Now I don't know what happens if SRCDEST is set but PKGDEST is not....

thank you again, bender02!
i've changed this in v2.5.
if PKGDEST not set, makepkg leaves source tarball in current directory.

vlad


pkgman - the ultimate mosquito control (AUR)

Offline

 

#18 2008-05-23 10:58:31

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

DonVla wrote:

you can edit a PKGBUILD and then run makepkg ("pkgman -emb"). if this fails you can edit it again. afterwards you can tag the source tarball file (smth like <test 1>). then run "pkgman --flush" to clear the directory (it doesnīt remove the package source files - the actual code) and reedit a version by running "pkgman -e -v <version of source tarball and tag>"

I ran 'pkgman -emb' on a package, created a package... etc... but .src.tar.gz was not created at any point - so pkgman --flush deleted the PKGBUILD, which is now nowhere to be found.

I guess I don't like that --flush deletes also PKGBUILDs, .install files and such - since if they're not backed up (which is a thing which I still don't know when it happens), they're just lost.

Offline

 

#19 2008-05-23 13:17:31

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

hi bender02,

bender02 wrote:

I ran 'pkgman -emb' on a package, created a package... etc... but .src.tar.gz was not created at any point - so pkgman --flush deleted the PKGBUILD, which is now nowhere to be found.

the "-b" flag depends on your BackupTarball seeting in pkgman.conf. if "BackupTarball=no" then using "-b" creates the src.tar.gz file and moves it to your <packagename>/.backup/ directory, if "BackupTarball=yes", then using "-b" *does not* create the src.tar.gz.
as i said, i use "BackupTarball=yes" in my pkgman.conf, so the edited PKGBUILD+files are always backed up. no need then to use -b every time. perhaps i should change the default setting to "BackupTarball=yes".

to make it clear: --makepkg, --backup, --repoadd and --switch "react" on your settings of UseMakepkg, BackupTarball, UseRepoadd and SwitchToBuildDirectory.
for example --switch: if you want to change to build directory everytime you edit or build a package then you set "SwitchToBuildDirectory=yes" in your pkgman.conf. using --switch then, pkgman does not ask to change to that directory. this option is disabled (SwitchToBuildDirectory is temporarily set to no). the other three options behave the same way.
when setting these four options to no, the flags act like simple "do this, then do that" flags.
the first time it might be confusing, but i thnik it's quite convenient when you get used to.

vlad

Last edited by DonVla (2008-05-23 13:19:36)


pkgman - the ultimate mosquito control (AUR)

Offline

 

#20 2008-05-23 18:49:37

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

Thanks again! Somehow, the idea that switches interact with the conf file setting did not make it to my (tiny inferior) brain. It (slowly) begins to make sense... (I set BackupTarball=Yes for instance, so I shouldn't have been surprised that 'pkgman -emb' didn't make the backup smile

Offline

 

#21 2008-05-25 03:09:22

Stythys
Member
From: California
Registered: 2008-05-18
Posts: 708
Website

Re: pkgman - a bash script for local package and PKGBUILD management

dude...pkgman is awesome.

nice job smile


What will you do...when the penguin finds you?

Offline

 

#22 2008-05-25 08:45:51

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 155

Re: pkgman - a bash script for local package and PKGBUILD management

Seems pretty handy, actually.

Just make it shell agnostic, because I suddenly found myself in bash.

Last edited by scj (2008-05-25 08:46:17)

Offline

 

#23 2008-05-25 09:02:38

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 824

Re: pkgman - a bash script for local package and PKGBUILD management

scj wrote:

Seems pretty handy, actually.

Just make it shell agnostic, because I suddenly found myself in bash.

which shell do you use?
i'll add a ShellCommand variable to pkgman.conf next version.

i'm still trying to complete the manpage. is someone interested to help?
if one's not familiar with the nroff syntax, no problem, just send, post or mail me the text.

vlad

Last edited by DonVla (2008-05-25 09:07:27)


pkgman - the ultimate mosquito control (AUR)

Offline

 

#24 2008-05-25 09:13:20

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 155

Re: pkgman - a bash script for local package and PKGBUILD management

Eh, why not just use the $SHELL variable?

Offline

 

#25 2008-05-25 09:34:03

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1319

Re: pkgman - a bash script for local package and PKGBUILD management

DonVla wrote:

i'm still trying to complete the manpage. is someone interested to help?
if one's not familiar with the nroff syntax, no problem, just send, post or mail me the text.

I'll take a look. Posting because I have a suggestion if you don't like *roff: Use asciidoc (warning: to use it, you need to have 'asciidoc' and 'docbook-xsl' installed, but it works nicely).

Offline

 

Board footer

Powered by FluxBB