Skip to content

Commit

Permalink
Assuming it exists, update the Installed-Size field in the control file.
Browse files Browse the repository at this point in the history
  • Loading branch information
brbsix committed Sep 3, 2015
1 parent aa762e8 commit c92f7e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions debtool
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,15 @@ prep_build(){
error "'$ms' failed checksum verification"
return 1
fi

# update Installed-Size
newsize=$(du -k -s --apparent-size . 2>/dev/null | cut -f1)
if (( newsize > 0 )); then
sed -i "s/\(^Installed-Size:\) [0-9]\+/\1 $newsize/" DEBIAN/control || {
warning "Failed to update Installed-Size of ${PWD##*/}"
}
fi

) || exit 1
}

Expand Down

0 comments on commit c92f7e1

Please sign in to comment.