This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=4dda65356f685f5648b43ee41edc35f1d9c2b935

commit 4dda65356f685f5648b43ee41edc35f1d9c2b935
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Nov 27 13:50:31 2022 +0100

    dpkg-split: Add support for --root and --admindir
    
    This program accesses the database, so we should make it support at
    least the --root, --admindir options and the DPKG_ROOT, DPKG_ADMINDIR
    environment variables. This complements the existing --depotdir option.
---
 man/dpkg-split.pod | 23 +++++++++++++++++++++++
 src/split/main.c   | 16 ++++++++++------
 2 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/man/dpkg-split.pod b/man/dpkg-split.pod
index 6419c1a15..19cb3d551 100644
--- a/man/dpkg-split.pod
+++ b/man/dpkg-split.pod
@@ -172,6 +172,19 @@ Specifies an alternative directory for the queue of parts 
awaiting
 automatic reassembly. The default is
 B<%ADMINDIR%/parts>.
 
+=item B<--admindir> I<directory>
+
+Set the administrative directory to I<directory> (since dpkg 1.21.10).
+This is where the I<statoverride> file is stored.
+Defaults to «I<%ADMINDIR%>» if B<DPKG_ADMINDIR> has not been set.
+
+=item B<--root> I<directory>
+
+Set the root directory to B<directory> (since dpkg 1.21.10),
+which sets the installation directory to «I<directory>» and
+the administrative directory to «I<directory>B<%ADMINDIR%>»
+if B<DPKG_ROOT> has not been set.
+
 =item B<-S>, B<--partsize> I<kibibytes>
 
 Specifies the maximum part size when splitting, in kibibytes (1024
@@ -249,6 +262,16 @@ memory allocations, etc.
 
 =over
 
+=item B<DPKG_ROOT>
+
+If set and B<--root> option has not been specified,
+it will be used as the filesystem root directory (since dpkg 1.21.10).
+
+=item B<DPKG_ADMINDIR>
+
+If set and the B<--admindir> or B<--root> options have not been specified,
+it will be used as the B<dpkg> data directory (since dpkg 1.21.10).
+
 =item B<DPKG_DEBUG>
 
 Sets the debug mask (since dpkg 1.21.10) from an octal value.
diff --git a/src/split/main.c b/src/split/main.c
index fb8fa4361..68c0791bc 100644
--- a/src/split/main.c
+++ b/src/split/main.c
@@ -80,13 +80,15 @@ usage(const char *const *argv)
 
   printf(_(
 "Options:\n"
-"  --depotdir <directory>           Use <directory> instead of %s/%s.\n"
-"  -S|--partsize <size>             In KiB, for -s (default is 450).\n"
-"  -o|--output <file>               Filename, for -j (default is\n"
+"      --depotdir <directory>       Use <directory> instead of %s/%s.\n"
+"      --admindir <directory>       Use <directory> instead of %s.\n"
+"      --root <directory>           Use <directory> instead of %s.\n"
+"  -S, --partsize <size>            In KiB, for -s (default is 450).\n"
+"  -o, --output <file>              Filename, for -j (default is\n"
 "                                     <package>_<version>_<arch>.deb).\n"
-"  -Q|--npquiet                     Be quiet when -a is not a part.\n"
-"  --msdos                          Generate 8.3 filenames.\n"
-"\n"), ADMINDIR, PARTSDIR);
+"  -Q, --npquiet                    Be quiet when -a is not a part.\n"
+"      --msdos                      Generate 8.3 filenames.\n"
+"\n"), ADMINDIR, PARTSDIR, ADMINDIR, "/");
 
   printf(_(
 "Exit status:\n"
@@ -146,6 +148,8 @@ static const struct cmdinfo cmdinfos[]= {
   ACTION("help",    '?',  0,  usage),
   ACTION("version",  0,   0,  printversion),
 
+  { "admindir",      0,   1,  NULL, NULL,             set_admindir,   0   },
+  { "root",          0,   1,  NULL, NULL,             set_root,       0   },
   { "depotdir",      0,   1,  NULL, &opt_depotdir,    NULL                },
   { "partsize",     'S',  1,  NULL, NULL,             set_part_size       },
   { "output",       'o',  1,  NULL, &opt_outputfile,  NULL                },

-- 
Dpkg.Org's dpkg

Reply via email to