d2learner
d2learner

Reputation: 3

Can I get the size of the RPM being installed in my .spec?

In my .spec file directive I want to get the RPM file size (yes, from which the .spec directive is being read from). I want to get this file size and save it as a temporary variable that I will use for a computation purpose later in the .spec file.

Is there a easy way to do this? I don't want to depend on hardcoding where I think the .rpm file might live and performing a du command.

Upvotes: 0

Views: 231

Answers (1)

Aaron D. Marasco
Aaron D. Marasco

Reputation: 6748

This is impossible; the size of the file is unknown because it is still being created when the specfile is parsed.

Upvotes: 1

Related Questions