Commit e8ef006f authored by Bernhard Link's avatar Bernhard Link

finish support for includebyhand and includelogs tracking options, add LogDir for processincoming

parent 95e4c973
2009-02-08
* processincoming support includebyhand and includelogs tracking
options
* new LogDir for processincoming, that gets the .changes files,
.log files and unused byhand (or raw-*) files.
2009-02-06
* ignore byhand and logfiles in 'include' unless tracking
with includebyhand or includelogs is activated, then store them
......
/* This file is part of "reprepro"
* Copyright (C) 2003,2004,2005,2006,2007 Bernhard R. Link
* Copyright (C) 2003,2004,2005,2006,2007,2009 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
......
......@@ -980,7 +980,7 @@ distribution.
.br
.B minimal
Remove files no longer included in the tracked distribution.
(Remove changes and includebyhand files once no file is
(Remove changes, logs and includebyhand files once no file is
in any part of the distribution).
.br
And any number of the following (or none):
......@@ -990,7 +990,13 @@ Add the .changes file to the tracked files of a source package.
Thus it is also put into the pool.
.br
.B includebyhand
Not yet implemented.
Add \fBbyhand\fP and \fBraw-\fP\fI*\fP files to the tracked
files and thus in the pool.
.br
.B includelogs
Add log files to the tracked files and thus in the pool.
(Not that putting log files in changes files is a reprepro
extension not found in normal changes files)
.br
.B embargoalls
Not yet implemented.
......@@ -1344,6 +1350,9 @@ are copied into before they are read.
You can avoid some copy operatations by placing this directory
within the same moint point the pool hierachy
is (at least partially) in.
.B LogDir
A directory where .changes files, .log files and otherwise unused .byhand
files are stored upon procession.
.TP
.B Allow \fIarguments
Each argument is either a pair \fIname1\fB>\fIname2\fR or simply
......
This diff is collapsed.
/* This file is part of "reprepro"
* Copyright (C) 2003,2004,2005,2006,2007,2008 Bernhard R. Link
* Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
......@@ -651,3 +651,18 @@ char *calc_filekey(component_t component, const char *sourcename, const char *fi
return NULL;
}
char *calc_byhanddir(component_t component, const char *sourcename, const char *version) {
if( sourcename[0] == 'l' && sourcename[1] == 'i' &&
sourcename[2] == 'b' && sourcename[3] != '\0' )
return mprintf("pool/%s/lib%c/%s/%s_%s_byhand",
atoms_components[component],
sourcename[3], sourcename,
sourcename, version);
else if( *sourcename != '\0' )
return mprintf("pool/%s/%c/%s/%s_%s_byhand",
atoms_components[component],
sourcename[0], sourcename,
sourcename, version);
else
return NULL;
}
......@@ -46,4 +46,5 @@ retvalue sources_complete(const struct dsc_headers *, const char *directory, con
char *calc_source_basename(const char *name, const char *version);
char *calc_sourcedir(component_t, const char *sourcename);
char *calc_filekey(component_t, const char *sourcename, const char *filename);
char *calc_byhanddir(component_t, const char *sourcename, const char *version);
#endif
......@@ -367,5 +367,205 @@ EOF
dodo test ! -e pool
rm -r dists db
rm -r documentation_9876AD* conf test.changes results results.expected *.txt
mkdir i j tmp
mv *.txt documentation_9876AD* test.changes j/
cp j/* i/
cat > conf/incoming <<EOF
Name: foo
IncomingDir: i
TempDir: tmp
Default: test
EOF
testrun - processincoming foo 3<<EOF
stderr
=Data seems not to be signed trying to use directly...
stdout
-v2*=Created directory "./db"
-v2*=Created directory "./pool"
-v2*=Created directory "./pool/main"
-v2*=Created directory "./pool/main/d"
-v2*=Created directory "./pool/main/d/documentation"
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_source+all.changes' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_coal+all.log' added to checksums.db(pool).
-v2*=Created directory "./pool/main/d/documentation/documentation_9876AD_byhand"
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_byhand/history.txt' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_byhand/manifesto.txt' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_all.deb' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD.tar.gz' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD.dsc' added to checksums.db(pool).
-d1*=db: 'documentation' added to packages.db(test|main|coal).
-d1*=db: 'documentation' added to packages.db(test|main|source).
-d1*=db: 'documentation' added to tracking.db(test).
-v1*=deleting './i/documentation_9876AD_all.deb'...
-v1*=deleting './i/documentation_9876AD_coal+all.log'...
-v1*=deleting './i/documentation_9876AD.tar.gz'...
-v1*=deleting './i/history.txt'...
-v1*=deleting './i/manifesto.txt'...
-v1*=deleting './i/documentation_9876AD.dsc'...
-v1*=deleting './i/test.changes'...
-v0*=Exporting indices...
-v2*=Created directory "./dists"
-v2*=Created directory "./dists/test"
-v2*=Created directory "./dists/test/main"
-v2*=Created directory "./dists/test/main/binary-coal"
-v6*= looking for changes in 'test|main|coal'...
-v6*= creating './dists/test/main/binary-coal/Packages' (uncompressed,gzipped)
-v2*=Created directory "./dists/test/main/source"
-v6*= looking for changes in 'test|main|source'...
-v6*= creating './dists/test/main/source/Sources' (gzipped)
EOF
cat >results.expected <<EOF
Distribution: test
Source: documentation
Version: 9876AD
Files:
pool/main/d/documentation/documentation_9876AD.dsc s 1
pool/main/d/documentation/documentation_9876AD.tar.gz s 1
pool/main/d/documentation/documentation_9876AD_all.deb a 1
pool/main/d/documentation/documentation_9876AD_byhand/manifesto.txt x 0
pool/main/d/documentation/documentation_9876AD_byhand/history.txt x 0
pool/main/d/documentation/documentation_9876AD_coal+all.log l 0
pool/main/d/documentation/documentation_9876AD_source+all.changes c 0
EOF
testout - dumptracks test 3<<EOF
EOF
dodiff results.expected results
rm -r db pool dists
cp j/* i/
ed -s conf/distributions <<EOF
g/^Tracking: /s/include[^ ]*//g
w
q
EOF
testrun - processincoming foo 3<<EOF
stdout
-v2*=Created directory "./db"
stderr
=Data seems not to be signed trying to use directly...
*=Error: 'test.changes' contains unused file 'documentation_9876AD_coal+all.log'!
*=(Do Permit: unused_files to conf/incoming to ignore and
*= additionaly Cleanup: unused_files to delete them)
*=Alternatively, you can also add a LogDir: for 'foo' into conf/incoming
*=then files like that will be stored there.
-v0*=There have been errors!
returns 255
EOF
cat >> conf/incoming <<EOF
Logdir: log
EOF
testrun - processincoming foo 3<<EOF
stderr
=Data seems not to be signed trying to use directly...
stdout
-v2*=Created directory "./pool"
-v2*=Created directory "./pool/main"
-v2*=Created directory "./pool/main/d"
-v2*=Created directory "./pool/main/d/documentation"
-v2*=Created directory "log"
-v2*=Created directory "log/documentation_9876AD_source+all.0000000"
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_all.deb' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD.tar.gz' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD.dsc' added to checksums.db(pool).
-d1*=db: 'documentation' added to packages.db(test|main|coal).
-d1*=db: 'documentation' added to packages.db(test|main|source).
-d1*=db: 'documentation' added to tracking.db(test).
-v1*=deleting './i/documentation_9876AD_all.deb'...
-v1*=deleting './i/documentation_9876AD_coal+all.log'...
-v1*=deleting './i/documentation_9876AD.tar.gz'...
-v1*=deleting './i/history.txt'...
-v1*=deleting './i/manifesto.txt'...
-v1*=deleting './i/documentation_9876AD.dsc'...
-v1*=deleting './i/test.changes'...
-v0*=Exporting indices...
-v2*=Created directory "./dists"
-v2*=Created directory "./dists/test"
-v2*=Created directory "./dists/test/main"
-v2*=Created directory "./dists/test/main/binary-coal"
-v6*= looking for changes in 'test|main|coal'...
-v6*= creating './dists/test/main/binary-coal/Packages' (uncompressed,gzipped)
-v2*=Created directory "./dists/test/main/source"
-v6*= looking for changes in 'test|main|source'...
-v6*= creating './dists/test/main/source/Sources' (gzipped)
EOF
ls log/documentation_9876AD_source+all.0000000 | sort > results
cat > results.expected <<EOF
documentation_9876AD_coal+all.log
history.txt
manifesto.txt
test.changes
EOF
dodiff results.expected results
rm -r db pool dists
cp j/* i/
ed -s conf/distributions <<EOF
g/^Tracking: /d
a
Tracking: all includechanges includelogs includebyhand
.
w
q
EOF
testrun - processincoming foo 3<<EOF
stderr
=Data seems not to be signed trying to use directly...
stdout
-v2*=Created directory "./db"
-v2*=Created directory "./pool"
-v2*=Created directory "./pool/main"
-v2*=Created directory "./pool/main/d"
-v2*=Created directory "./pool/main/d/documentation"
-v2*=Created directory "log/documentation_9876AD_source+all.0000001"
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_source+all.changes' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_coal+all.log' added to checksums.db(pool).
-v2*=Created directory "./pool/main/d/documentation/documentation_9876AD_byhand"
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_byhand/history.txt' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_byhand/manifesto.txt' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD_all.deb' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD.tar.gz' added to checksums.db(pool).
-d1*=db: 'pool/main/d/documentation/documentation_9876AD.dsc' added to checksums.db(pool).
-d1*=db: 'documentation' added to packages.db(test|main|coal).
-d1*=db: 'documentation' added to packages.db(test|main|source).
-d1*=db: 'documentation' added to tracking.db(test).
-v1*=deleting './i/documentation_9876AD_all.deb'...
-v1*=deleting './i/documentation_9876AD_coal+all.log'...
-v1*=deleting './i/documentation_9876AD.tar.gz'...
-v1*=deleting './i/history.txt'...
-v1*=deleting './i/manifesto.txt'...
-v1*=deleting './i/documentation_9876AD.dsc'...
-v1*=deleting './i/test.changes'...
-v0*=Exporting indices...
-v2*=Created directory "./dists"
-v2*=Created directory "./dists/test"
-v2*=Created directory "./dists/test/main"
-v2*=Created directory "./dists/test/main/binary-coal"
-v6*= looking for changes in 'test|main|coal'...
-v6*= creating './dists/test/main/binary-coal/Packages' (uncompressed,gzipped)
-v2*=Created directory "./dists/test/main/source"
-v6*= looking for changes in 'test|main|source'...
-v6*= creating './dists/test/main/source/Sources' (gzipped)
EOF
ls log/documentation_9876AD_source+all.0000001 | sort > results
cat > results.expected <<EOF
documentation_9876AD_coal+all.log
test.changes
EOF
dodiff results.expected results
# TODO: check for multiple distributions
# some storing some not, and when the handling script is implemented
rm -r i j tmp conf results results.expected log
testsuccess
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment