Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
2f96e60a
Commit
2f96e60a
authored
Feb 19, 2012
by
Nicolas Dandrimont
🤔
Browse files
Clean up the clumsy uses of dh_gencontrol and dput. Use dcmd and dpkg-deb directly.
parent
9ae330fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/scripts/mass-reimporter.sh
View file @
2f96e60a
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
# DEALINGS IN THE SOFTWARE.
# DEALINGS IN THE SOFTWARE.
set
-e
set
-e
shopt
-s
nullglob
# Debexpo importer scripts with arguments. Should end in -c
# Debexpo importer scripts with arguments. Should end in -c
IMPORTER
=
"
$(
dirname
"
$0
"
)
/debexpo_importer.py --skip-email --skip-gpg-check -i development.ini -c"
IMPORTER
=
"
$(
dirname
"
$0
"
)
/debexpo_importer.py --skip-email --skip-gpg-check -i development.ini -c"
...
@@ -41,30 +42,36 @@ forge_changes () {
...
@@ -41,30 +42,36 @@ forge_changes () {
dsc_root
=
$(
basename
"
$dsc_file
"
.dsc
)
dsc_root
=
$(
basename
"
$dsc_file
"
.dsc
)
cur_dir
=
$(
pwd
)
cur_dir
=
$(
pwd
)
find
$dsc_dir
-maxdepth
1
-type
f |
while
read
file
;
do
version
=
${
dsc_root
##*_
}
# copy the .dsc and related files
dcmd
cp
$dsc_file
$temp_dir
cd
$dsc_dir
files
=(
*
_
${
version
}
_
*
.deb
)
# copy the other interesting files (.debs)
for
file
in
"
${
files
[@]
}
"
;
do
cp
$file
$temp_dir
cp
$file
$temp_dir
done
done
dpkg-source
-x
$dsc_file
$temp_dir
/extracted
dpkg-source
-x
$dsc_file
$temp_dir
/extracted
cd
$temp_dir
/extracted
cd
$temp_dir
/extracted
fakeroot dh_gencontrol
mv
debian/files debian/files.tmp
if
[
"
${#
files
[@]
}
"
-ne
"0"
]
;
then
cat
debian/files.tmp |
while
read
deb section priority
;
do
:
>
debian/files
deb_noarch
=
"
${
deb
%_*.deb
}
"
for
file
in
"
${
files
[@]
}
"
;
do
shopt
-s
nullglob
section
=
$(
dpkg-deb
-f
"../
$file
"
Section
)
files
=(
../
${
deb_noarch
}*
.deb
)
priority
=
$(
dpkg-deb
-f
"../
$file
"
Priority
)
if
[
"
${#
files
[@]
}
"
-eq
0
]
;
then
echo
"
$file
$section
$priority
"
>>
debian/files
file
=
$deb
done
else
dpkg-genchanges
>
"../
${
dsc_root
}
_forged.changes"
file
=
$(
basename
"
${
files
[0]
}
"
)
else
fi
echo
"
$file
$section
$priority
"
>>
debian/files
done
if
!
dpkg-genchanges
>
"../
${
dsc_root
}
_forged.changes"
;
then
echo
"!!! dpkg-genchanges for
${
dsc_root
}
failed, a .deb is surely missing. Trying to fake a source-only upload"
dpkg-genchanges
-S
>
"../
${
dsc_root
}
_forged.changes"
dpkg-genchanges
-S
>
"../
${
dsc_root
}
_forged.changes"
fi
fi
cd
$cur_dir
cd
$cur_dir
}
}
...
@@ -74,9 +81,7 @@ copy_changes () {
...
@@ -74,9 +81,7 @@ copy_changes () {
changes_file
=
"
$1
"
changes_file
=
"
$1
"
destdir
=
"
$2
"
destdir
=
"
$2
"
dput
-u
-s
"
${
changes_file
}
"
|
awk
'/Uploading/{print $4}'
|
while
read
f
;
do
dcmd
cp
"
${
changes_file
}
"
"
$destdir
"
cp
"
$f
"
"
$destdir
"
done
}
}
# Forge a changes file for $1 and upload it into $2.
# Forge a changes file for $1 and upload it into $2.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment